<?php
	/*
	 *    Copyright 2009 OneProfession
	 *
	 *     Licensed under the Apache License, Version 2.0 (the "License");
	 *     you may not use this file except in compliance with the License.
	 *     You may obtain a copy of the License at
	 *
	 *          http://www.apache.org/licenses/LICENSE-2.0
	 *
	 *      Unless required by applicable law or agreed to in writing, software
	 *      distributed under the License is distributed on an "AS IS" BASIS,
	 *      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	 *      See the License for the specific language governing permissions and
	 *      limitations under the License.
	 */
	
	/*
	 * Object mysql implements DefaultConnector
	 */
	class mysql extends DefaultConnector{
		
		/*
		 * Configuration Options Array - overwritten by UAS once read from configuration.
		 */
		public $config_options = Array();
		
		public $read_threads = Array();
		
		public $write_threads = Array();
		
		public function write_threads($threadvalues){
			// Connect to database
			$m = new MySQLi;
			$m->mysqli_connect(host, username, pw, dbname);

			// Generate SQL string from array
			// Execute SQL string
		}
		
		public function read_threads($threads){
			// connect to database
			// generarte sql query
			// populate threadvalues array from results
			// return threadvalues
			return $threadvalues; //Array
		}
		
		public function login($userID){
			// set a database value true?
		}
		
		public function logout($userID){
			// set a database value false?
		}
		
		public function direct_login($userID){
			// return null, in this case
			return new DirectLoginData;
		}
		
	}
?>